//conf中type表示数据类型
//1为float,用readFloatLE
//is_end表示这个对象是否到此结束,表示用一个新的对象存储下一个channel的数据
export const smartMeterConf = [
    {
        "address": 0x100,
        "length": 30,
        "type": 1,
        "channel": 1,
        "properties": ["voltage", "frequency", "current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "voltage" },
            { "position": 2, "type": 1, "name": "b", "parent": "voltage" },
            { "position": 4, "type": 1, "name": "c", "parent": "voltage" },
            { "position": 6, "type": 1, "name": "ab", "parent": "voltage" },
            { "position": 8, "type": 1, "name": "bc", "parent": "voltage" },
            { "position": 10, "type": 1, "name": "ca", "parent": "voltage", "is_end": 1 },
            { "position": 12, "type": 1, "name": "frequency", "parent": "frequency", "is_end": 1 },
            { "position": 14, "type": 1, "name": "a", "parent": "current" },
            { "position": 16, "type": 1, "name": "b", "parent": "current" },
            { "position": 18, "type": 1, "name": "c", "parent": "current" },
            { "position": 20, "type": 1, "name": "zero", "parent": "current", "is_end": 1 },
            { "position": 22, "type": 1, "name": "a", "parent": "power" },
            { "position": 24, "type": 1, "name": "b", "parent": "power" },
            { "position": 26, "type": 1, "name": "c", "parent": "power" },
            { "position": 28, "type": 1, "name": "total", "parent": "power", "is_end": 1 },
        ]
    },
    {
        "address": 0x136,
        "length": 16,
        "type": 1,
        "channel": 1,
        "properties": ["energy"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "energy" },
            { "position": 2, "type": 1, "name": "b", "parent": "energy" },
            { "position": 4, "type": 1, "name": "c", "parent": "energy" },
            { "position": 6, "type": 1, "name": "total", "parent": "energy" },
            { "position": 8, "type": 1, "name": "a_reverse", "parent": "energy" },
            { "position": 10, "type": 1, "name": "b_reverse", "parent": "energy" },
            { "position": 12, "type": 1, "name": "c_reverse", "parent": "energy" },
            { "position": 14, "type": 1, "name": "total_reverse", "parent": "energy", "is_end": 1 },
        ]
    },

    {
        "address": 0x156,
        "length": 30,
        "type": 1,
        "channel": 2,
        "properties": ["voltage", "frequency", "current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "voltage" },
            { "position": 2, "type": 1, "name": "b", "parent": "voltage" },
            { "position": 4, "type": 1, "name": "c", "parent": "voltage" },
            { "position": 6, "type": 1, "name": "ab", "parent": "voltage" },
            { "position": 8, "type": 1, "name": "bc", "parent": "voltage" },
            { "position": 10, "type": 1, "name": "ca", "parent": "voltage", "is_end": 1 },
            { "position": 12, "type": 1, "name": "frequency", "parent": "frequency", "is_end": 1 },
            { "position": 14, "type": 1, "name": "a", "parent": "current" },
            { "position": 16, "type": 1, "name": "b", "parent": "current" },
            { "position": 18, "type": 1, "name": "c", "parent": "current" },
            { "position": 20, "type": 1, "name": "zero", "parent": "current", "is_end": 1 },
            { "position": 22, "type": 1, "name": "a", "parent": "power" },
            { "position": 24, "type": 1, "name": "b", "parent": "power" },
            { "position": 26, "type": 1, "name": "c", "parent": "power" },
            { "position": 28, "type": 1, "name": "total", "parent": "power", "is_end": 1 },
        ]
    },
    {
        "address": 0x18c,
        "length": 16,
        "type": 1,
        "channel": 2,
        "properties": ["energy"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "energy" },
            { "position": 2, "type": 1, "name": "b", "parent": "energy" },
            { "position": 4, "type": 1, "name": "c", "parent": "energy" },
            { "position": 6, "type": 1, "name": "total", "parent": "energy" },
            { "position": 8, "type": 1, "name": "a_reverse", "parent": "energy" },
            { "position": 10, "type": 1, "name": "b_reverse", "parent": "energy" },
            { "position": 12, "type": 1, "name": "c_reverse", "parent": "energy" },
            { "position": 14, "type": 1, "name": "total_reverse", "parent": "energy", "is_end": 1 },
        ]
    },

    {
        "address": 0x1ac,
        "length": 30,
        "type": 1,
        "channel": 3,
        "properties": ["voltage", "frequency", "current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "voltage" },
            { "position": 2, "type": 1, "name": "b", "parent": "voltage" },
            { "position": 4, "type": 1, "name": "c", "parent": "voltage" },
            { "position": 6, "type": 1, "name": "ab", "parent": "voltage" },
            { "position": 8, "type": 1, "name": "bc", "parent": "voltage" },
            { "position": 10, "type": 1, "name": "ca", "parent": "voltage", "is_end": 1 },
            { "position": 12, "type": 1, "name": "frequency", "parent": "frequency", "is_end": 1 },
            { "position": 14, "type": 1, "name": "a", "parent": "current" },
            { "position": 16, "type": 1, "name": "b", "parent": "current" },
            { "position": 18, "type": 1, "name": "c", "parent": "current" },
            { "position": 20, "type": 1, "name": "zero", "parent": "current", "is_end": 1 },
            { "position": 22, "type": 1, "name": "a", "parent": "power" },
            { "position": 24, "type": 1, "name": "b", "parent": "power" },
            { "position": 26, "type": 1, "name": "c", "parent": "power" },
            { "position": 28, "type": 1, "name": "total", "parent": "power", "is_end": 1 },
        ]
    },
    {
        "address": 0x1e2,
        "length": 16,
        "type": 1,
        "channel": 3,
        "properties": ["energy"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "energy" },
            { "position": 2, "type": 1, "name": "b", "parent": "energy" },
            { "position": 4, "type": 1, "name": "c", "parent": "energy" },
            { "position": 6, "type": 1, "name": "total", "parent": "energy" },
            { "position": 8, "type": 1, "name": "a_reverse", "parent": "energy" },
            { "position": 10, "type": 1, "name": "b_reverse", "parent": "energy" },
            { "position": 12, "type": 1, "name": "c_reverse", "parent": "energy" },
            { "position": 14, "type": 1, "name": "total_reverse", "parent": "energy", "is_end": 1 },
        ]
    },

    {
        "address": 0x202,
        "length": 30,
        "type": 1,
        "channel": 4,
        "properties": ["voltage", "frequency", "current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "voltage" },
            { "position": 2, "type": 1, "name": "b", "parent": "voltage" },
            { "position": 4, "type": 1, "name": "c", "parent": "voltage" },
            { "position": 6, "type": 1, "name": "ab", "parent": "voltage" },
            { "position": 8, "type": 1, "name": "bc", "parent": "voltage" },
            { "position": 10, "type": 1, "name": "ca", "parent": "voltage", "is_end": 1 },
            { "position": 12, "type": 1, "name": "frequency", "parent": "frequency", "is_end": 1 },
            { "position": 14, "type": 1, "name": "a", "parent": "current" },
            { "position": 16, "type": 1, "name": "b", "parent": "current" },
            { "position": 18, "type": 1, "name": "c", "parent": "current" },
            { "position": 20, "type": 1, "name": "zero", "parent": "current", "is_end": 1 },
            { "position": 22, "type": 1, "name": "a", "parent": "power" },
            { "position": 24, "type": 1, "name": "b", "parent": "power" },
            { "position": 26, "type": 1, "name": "c", "parent": "power" },
            { "position": 28, "type": 1, "name": "total", "parent": "power", "is_end": 1 },
        ]
    },
    {
        "address": 0x236,
        "length": 16,
        "type": 1,
        "channel": 4,
        "properties": ["energy"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "energy" },
            { "position": 2, "type": 1, "name": "b", "parent": "energy" },
            { "position": 4, "type": 1, "name": "c", "parent": "energy" },
            { "position": 6, "type": 1, "name": "total", "parent": "energy" },
            { "position": 8, "type": 1, "name": "a_reverse", "parent": "energy" },
            { "position": 10, "type": 1, "name": "b_reverse", "parent": "energy" },
            { "position": 12, "type": 1, "name": "c_reverse", "parent": "energy" },
            { "position": 14, "type": 1, "name": "total_reverse", "parent": "energy", "is_end": 1 },
        ]
    },
    //统计数据，所有数据都带有时间
    //需量
    {
        "address": 0x168c,
        "length": 35,
        "type": 2,
        "channel": 1,
        "properties": ["demand_current", "demand_power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "demand_current" },
            { "position": 5, "type": 1, "name": "b", "parent": "demand_current" },
            { "position": 10, "type": 1, "name": "c", "parent": "demand_current" , "is_end": 1},
            { "position": 15, "type": 1, "name": "a", "parent": "demand_power" },
            { "position": 20, "type": 1, "name": "b", "parent": "demand_power" },
            { "position": 25, "type": 1, "name": "c", "parent": "demand_power" },
            { "position": 30, "type": 1, "name": "total", "parent": "demand_power" , "is_end": 1},

        ]
    },
    {
        "address": 0x16af,
        "length": 35,
        "type": 2,
        "channel": 2,
        "properties": ["demand_current", "demand_power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "demand_current" },
            { "position": 5, "type": 1, "name": "b", "parent": "demand_current" },
            { "position": 10, "type": 1, "name": "c", "parent": "demand_current" , "is_end": 1},
            { "position": 15, "type": 1, "name": "a", "parent": "demand_power" },
            { "position": 20, "type": 1, "name": "b", "parent": "demand_power" },
            { "position": 25, "type": 1, "name": "c", "parent": "demand_power" },
            { "position": 30, "type": 1, "name": "total", "parent": "demand_power" , "is_end": 1},

        ]
    },
    {
        "address": 0x16d2,
        "length": 35,
        "type": 2,
        "channel": 3,
        "properties": ["demand_current", "demand_power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "demand_current" },
            { "position": 5, "type": 1, "name": "b", "parent": "demand_current" },
            { "position": 10, "type": 1, "name": "c", "parent": "demand_current" , "is_end": 1},
            { "position": 15, "type": 1, "name": "a", "parent": "demand_power" },
            { "position": 20, "type": 1, "name": "b", "parent": "demand_power" },
            { "position": 25, "type": 1, "name": "c", "parent": "demand_power" },
            { "position": 30, "type": 1, "name": "total", "parent": "demand_power" , "is_end": 1},

        ]
    },

    {
        "address": 0x16f5,
        "length": 35,
        "type": 2,
        "channel": 4,
        "properties": ["demand_current", "demand_power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a", "parent": "demand_current" },
            { "position": 5, "type": 1, "name": "b", "parent": "demand_current" },
            { "position": 10, "type": 1, "name": "c", "parent": "demand_current" , "is_end": 1},
            { "position": 15, "type": 1, "name": "a", "parent": "demand_power" },
            { "position": 20, "type": 1, "name": "b", "parent": "demand_power" },
            { "position": 25, "type": 1, "name": "c", "parent": "demand_power" },
            { "position": 30, "type": 1, "name": "total", "parent": "demand_power" , "is_end": 1},

        ]
    },

    //极值
    {
        "address": 0x95a,
        "length": 60,
        "type": 2,
        "channel": 1,
        "properties": ["voltage"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_max", "parent": "voltage" },
            { "position": 5, "type": 1, "name": "b_max", "parent": "voltage" },
            { "position": 10, "type": 1, "name": "c_max", "parent": "voltage" },
            { "position": 15, "type": 1, "name": "ab_max", "parent": "voltage" },
            { "position": 20, "type": 1, "name": "bc_max", "parent": "voltage" },
            { "position": 25, "type": 1, "name": "ca_max", "parent": "voltage" },
            { "position": 30, "type": 1, "name": "a_min", "parent": "voltage" },
            { "position": 35, "type": 1, "name": "b_min", "parent": "voltage" },
            { "position": 40, "type": 1, "name": "c_min", "parent": "voltage" },
            { "position": 45, "type": 1, "name": "ab_min", "parent": "voltage" },
            { "position": 50, "type": 1, "name": "bc_min", "parent": "voltage" },
            { "position": 55, "type": 1, "name": "ca_min", "parent": "voltage" , "is_end": 1},
        ]
    },
    {
        "address": 0xa1d,
        "length": 40,
        "type": 2,
        "channel": 1,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_max", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_max", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_max", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_max", "parent": "current" },
            { "position": 20, "type": 1, "name": "a_active_power_max", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_max", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_max", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_max", "parent": "power" },
        ]
    },
    {
        "address": 0xa6d,
        "length": 20,
        "type": 2,
        "channel": 1,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_max", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_max", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_max", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_max", "parent": "power" },
        ]
    },
    {
        "address": 0xaef,
        "length": 40,
        "type": 2,
        "channel": 1,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_min", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_min", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_min", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_min", "parent": "current" , "is_end": 1},
            { "position": 20, "type": 1, "name": "a_active_power_min", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_min", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_min", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_min", "parent": "power" },
        ]
    },
    {
        "address": 0xb3f,
        "length": 20,
        "type": 2,
        "channel": 1,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_min", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_min", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_min", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_min", "parent": "power" , "is_end": 1},

        ]
    },
    //channel2
    {
        "address": 0xd00,
        "length": 40,
        "type": 2,
        "channel": 2,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_max", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_max", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_max", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_max", "parent": "current" },
            { "position": 20, "type": 1, "name": "a_active_power_max", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_max", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_max", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_max", "parent": "power" },
        ]
    },
    {
        "address": 0xd50,
        "length": 20,
        "type": 2,
        "channel": 2,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_max", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_max", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_max", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_max", "parent": "power" },
        ]
    },
    {
        "address": 0xdd4,
        "length": 40,
        "type": 2,
        "channel": 2,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_min", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_min", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_min", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_min", "parent": "current" , "is_end": 1},
            { "position": 20, "type": 1, "name": "a_active_power_min", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_min", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_min", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_min", "parent": "power" },
        ]
    },
    {
        "address": 0xe22,
        "length": 20,
        "type": 2,
        "channel": 2,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_min", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_min", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_min", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_min", "parent": "power" , "is_end": 1},

        ]
    },
    //channel3
    {
        "address": 0x1000,
        "length": 40,
        "type": 2,
        "channel": 3,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_max", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_max", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_max", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_max", "parent": "current" },
            { "position": 20, "type": 1, "name": "a_active_power_max", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_max", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_max", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_max", "parent": "power" },
        ]
    },
    {
        "address": 0x1050,
        "length": 20,
        "type": 2,
        "channel": 3,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_max", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_max", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_max", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_max", "parent": "power" },
        ]
    },
    {
        "address": 0x10d4,
        "length": 40,
        "type": 2,
        "channel": 3,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_min", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_min", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_min", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_min", "parent": "current" , "is_end": 1},
            { "position": 20, "type": 1, "name": "a_active_power_min", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_min", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_min", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_min", "parent": "power" },
        ]
    },
    {
        "address": 0x1122,
        "length": 20,
        "type": 2,
        "channel": 3,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_min", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_min", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_min", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_min", "parent": "power" , "is_end": 1},

        ]
    },
    //channel4
    {
        "address": 0x1300,
        "length": 40,
        "type": 2,
        "channel": 4,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_max", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_max", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_max", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_max", "parent": "current" },
            { "position": 20, "type": 1, "name": "a_active_power_max", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_max", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_max", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_max", "parent": "power" },
        ]
    },
    {
        "address": 0x1350,
        "length": 20,
        "type": 2,
        "channel": 4,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_max", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_max", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_max", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_max", "parent": "power" },
        ]
    },
    {
        "address": 0x13d4,
        "length": 40,
        "type": 2,
        "channel": 4,
        "properties": ["current", "power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_min", "parent": "current" },
            { "position": 5, "type": 1, "name": "b_min", "parent": "current" },
            { "position": 10, "type": 1, "name": "c_min", "parent": "current" },
            { "position": 15, "type": 1, "name": "zero_min", "parent": "current" , "is_end": 1},
            { "position": 20, "type": 1, "name": "a_active_power_min", "parent": "power" },
            { "position": 25, "type": 1, "name": "b_active_power_min", "parent": "power" },
            { "position": 30, "type": 1, "name": "c_active_power_min", "parent": "power" },
            { "position": 35, "type": 1, "name": "active_power_min", "parent": "power" },
        ]
    },
    {
        "address": 0x1422,
        "length": 20,
        "type": 2,
        "channel": 4,
        "properties": ["power"],
        "conf": [
            { "position": 0, "type": 1, "name": "a_power_factor_min", "parent": "power" },
            { "position": 5, "type": 1, "name": "b_power_factor_min", "parent": "power" },
            { "position": 10, "type": 1, "name": "c_power_factor_min", "parent": "power" },
            { "position": 15, "type": 1, "name": "power_factor_min", "parent": "power" , "is_end": 1},

        ]
    },
];